package com.lry.basic.netty.demo4.server;

import com.lry.basic.netty.demo4.entity.User;

import java.util.ArrayList;
import java.util.List;

/**
 * @author:刘仁有
 * @desc:
 * @email:953506233@qq.com
 * @data:2019/9/16
 */
public class UserServiceImpl implements UserService{
    List<User> userList = new ArrayList<>();
    {
        for(int i=0;i<10;i++){
            User user = new User(i,"name"+i,20+i);
            userList.add(user);
        }
    }
    @Override
    public User getUser(int id) {
        return userList.get(id);
    }
}
